<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示与隐藏</title>
    <script src="jQuery/jquery-1.11.3.js"></script>
</head>
<body>
        <script>                                                //有透明的效果
            $(function () {
                $('input').click(function () {
                    if($('img:hidden').length){
                        $('img').show(5000,'swing',function () {
                            $('input').val('隐藏')
                        })
                    }else {
                        $('img').hide(5000,'swing',function () {
                            $('input').val('显示')
                        })
                    }
                })
            })
        </script>
        <input type="button" value="点我">
        <img src="image/1.jpg">
</body>
</html>